Skip to content

fix: default to 'average' variation when navigating to package managers#75

Merged
darcyclarke merged 1 commit intomainfrom
fix/default-variation-average
Mar 14, 2026
Merged

fix: default to 'average' variation when navigating to package managers#75
darcyclarke merged 1 commit intomainfrom
fix/default-variation-average

Conversation

@vltbaudbot
Copy link
Contributor

Problem

When navigating away from the package managers view (e.g., to task runners or registries) and then clicking back, the page defaults to the "clean" variation instead of "average".

This is inconsistent with the initial page load, which uses sortVariations() to pick the first variation — which is "average".

Root Cause

In routes.tsx, the package-managers index route was hardcoded to redirect to clean:

{ index: true, element: <Navigate to="clean" replace={true} /> }

Meanwhile, the App.tsx useEffect that handles the initial //package-managers/{variation} redirect correctly uses sortVariations(), which puts "average" first.

When the user navigates away and clicks back, the NavLink goes to /package-managers (no variation), hitting the index route redirect — which was going to clean instead of average.

Fix

Changed the package-managers index route default from clean to average to match the intended behavior.

Changes

  • app/src/routes.tsx: Changed Navigate to="clean"Navigate to="average"

When clicking away from the package managers view and then clicking back,
the route index redirect was going to 'clean' instead of 'average'. This
was inconsistent with the initial load behavior which uses sortVariations()
to determine the first variation (which is 'average').

Changed the package-managers index route from Navigate to='clean' to
Navigate to='average' to match the intended default behavior.
@darcyclarke darcyclarke merged commit c12b807 into main Mar 14, 2026
6 checks passed
@darcyclarke darcyclarke deleted the fix/default-variation-average branch March 14, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants